<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // pending 准备状态
        // fulfilled 成功状态
        // rejected 失败状态
        // .then 处理
        // 一个.then就是一个微任务
        console.log(
            new Promise((resolve, reject) => {
                resolve('成功')
            }).then(value => {
                console.log('成功的处理1');
            }, reason => {
                console.log("失败的处理1");
            }).then(value => {
                console.log('成功的处理2');
            }, reason => {
                console.log("失败的处理2");
            })
        );
    </script>
</body>

</html>